/* 全局样式 */
:root {
    --primary-color: #4a6bdf;
    --secondary-color: #6c84e8;
    --accent-color: #ff7043;
    --text-color: #333333;
    --light-text: #666666;
    --background-color: #f5f7fa;
    --card-color: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px; /* 为底部导航留出空间 */
}

/* 顶部功能区样式 */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--card-color);
    border-bottom: 1px solid var(--border-color);
}

.countdown {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.countdown i {
    color: var(--primary-color);
    margin-right: 5px;
}

.countdown strong {
    color: var(--accent-color);
    font-weight: bold;
}

.daily-question button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.daily-question button i {
    margin-right: 5px;
}

/* 核心功能入口样式 */
.main-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
}

.feature-card {
    background-color: var(--card-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 12px;
    color: var(--light-text);
}

/* 底部状态栏样式 */
.bottom-status {
    background-color: var(--card-color);
    padding: 15px;
    margin: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-container {
    margin-bottom: 10px;
}

.progress-container span {
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    text-align: right;
    color: white;
    font-size: 10px;
    line-height: 10px;
    padding-right: 5px;
}

.question-count {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.question-count i {
    color: var(--success-color);
    margin-right: 5px;
}

/* 底部导航样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 414px;
    margin: 0 auto;
    display: flex;
    background-color: var(--card-color);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    color: var(--light-text);
    text-decoration: none;
}

.bottom-nav a.active {
    color: var(--primary-color);
}

.bottom-nav i {
    font-size: 20px;
    margin-bottom: 3px;
}

.bottom-nav span {
    font-size: 12px;
}

/* 每日一题弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: var(--card-color);
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.question h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.question-counter {
    text-align: center;
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
    background-color: var(--background-color);
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
    position: absolute;
    top: 15px;
    right: 50px;
}

.options {
    margin: 15px 0;
}

.option {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.option:hover {
    background-color: rgba(74, 107, 223, 0.05);
}

.option input[type="radio"]:checked + label {
    color: var(--primary-color);
    font-weight: bold;
}

.question-actions {
    display: flex;
    gap: 10px;
}

.submit-btn, .next-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    flex: 1;
}

.next-btn {
    background-color: var(--secondary-color);
}

.answer-explanation {
    margin-top: 15px;
    padding: 10px;
    background-color: #f0f8ff;
    border-radius: 5px;
}

.hidden {
    display: none;
}

/* 个人中心页面样式 */
.profile-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 15px;
    display: flex;
    align-items: center;
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 3px solid white;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 12px;
    opacity: 0.9;
}

.section-title {
    padding: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
    color: var(--primary-color);
}

.data-card {
    background-color: var(--card-color);
    margin: 0 15px 15px;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container {
    margin-bottom: 20px;
}

.chart-container h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.chart {
    height: 150px;
    width: 100%;
}

.topic-mastery {
    margin-bottom: 20px;
}

.topic-mastery h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.mastery-item {
    margin-bottom: 10px;
}

.mastery-item span {
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
}

.essay-stats h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-number {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-number span {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-number p {
    font-size: 12px;
    color: var(--light-text);
}

.collection-tabs {
    display: flex;
    margin: 0 15px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
}

.tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.collection-content {
    background-color: var(--card-color);
    margin: 0 15px 15px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    padding: 15px;
}

.tab-content.active {
    display: block;
}

.collection-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.collection-item:last-child {
    border-bottom: none;
}

.collection-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.collection-item p {
    font-size: 12px;
    color: var(--light-text);
}

.difficulty {
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
}

.difficulty.easy {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.difficulty.medium {
    background-color: #fff8e1;
    color: #ff8f00;
}

.difficulty.hard {
    background-color: #ffebee;
    color: #c62828;
}

.score {
    color: var(--primary-color);
    font-weight: bold;
}

.settings {
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--card-color);
    margin: 0 15px 1px;
}

.setting-item:first-of-type {
    border-radius: 10px 10px 0 0;
}

.setting-item:last-of-type {
    border-radius: 0 0 10px 10px;
    margin-bottom: 15px;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 夜间模式 */
body.night-mode {
    --primary-color: #7986cb;
    --secondary-color: #9fa8da;
    --accent-color: #ff7043;
    --text-color: #e0e0e0;
    --light-text: #9e9e9e;
    --background-color: #121212;
    --card-color: #1e1e1e;
    --border-color: #333333;
}

/* 响应式调整 */
@media (max-width: 320px) {
    .main-features {
        grid-template-columns: 1fr;
    }
}

/* 子页面通用样式 */
.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sub-header h1 {
    font-size: 18px;
    font-weight: 500;
}

.back-btn, .header-action {
    color: white;
    font-size: 18px;
}

.section-title {
    font-size: 16px;
    margin: 15px;
    color: var(--text-color);
    font-weight: 500;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px;
}

.more-link {
    font-size: 12px;
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.more-link i {
    margin-left: 5px;
}

/* 通用卡片样式 */
.card {
    background-color: var(--card-color);
    border-radius: 10px;
    padding: 15px;
    margin: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 通用按钮样式 */
.btn {
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 通用标签样式 */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    background-color: var(--background-color);
    color: var(--light-text);
} 